//
//  simple-presenter
//
//  Created by Francisco Silva on 7/16/11.
//  Copyright 2011 Francisco Silva. All rights reserved.
//

#import <Cocoa/Cocoa.h>
#import <Quartz/Quartz.h>
#import <QTKit/QTKit.h>

@interface FSSimplePresenter : NSObject <NSApplicationDelegate> {
@private    
    NSString *musicFolder;
    NSString *movieFolder;
    
    NSMutableArray *musicNames;
    NSMutableArray *movieNames;
    
    NSMutableDictionary *slides;
    
    NSWindow *window;
    NSWindow *projector;
    
    NSView *windowView;
    
    NSImageView *projectorImage;
    QTMovieView *projectorMovie;
    
    NSScrollView *scrollImages;
    NSScrollView *scrollVideos;
    NSScrollView *scrollThumbnails;
    
    NSTableView *tableImages;
    NSTableView *tableVideos;
    
    NSView *thumbnailContainer;
    
    NSButton *playPauseButton;
    NSButton *stopButton;
    NSButton *moreZoomButton;
    NSButton *lessZoomButton;
    NSButton *moreHeightButton;
    NSButton *lessHeightButton;
    NSButton *moreWidthButton;
    NSButton *lessWidthButton;
    NSButton *leftButton;
    NSButton *rightButton;
    NSButton *upButton;
    NSButton *downButton;
    NSButton *blankButton;
}

@property (assign) IBOutlet NSWindow *window;
@property (assign) IBOutlet NSWindow *projector;

@property (assign) IBOutlet NSView *windowView;

@property (assign) IBOutlet NSImageView *projectorImage;
@property (assign) IBOutlet QTMovieView *projectorMovie;

@property (assign) IBOutlet NSScrollView *scrollImages;
@property (assign) IBOutlet NSScrollView *scrollVideos;
@property (assign) IBOutlet NSScrollView *scrollThumbnails;

@property (assign) IBOutlet NSTableView *tableImages;
@property (assign) IBOutlet NSTableView *tableVideos;

@property (assign) IBOutlet NSView *thumbnailContainer;

@property (assign) IBOutlet NSButton *playPauseButton;
@property (assign) IBOutlet NSButton *stopButton;
@property (assign) IBOutlet NSButton *moreZoomButton;
@property (assign) IBOutlet NSButton *lessZoomButton;
@property (assign) IBOutlet NSButton *moreHeightButton;
@property (assign) IBOutlet NSButton *lessHeightButton;
@property (assign) IBOutlet NSButton *moreWidthButton;
@property (assign) IBOutlet NSButton *lessWidthButton;
@property (assign) IBOutlet NSButton *leftButton;
@property (assign) IBOutlet NSButton *rightButton;
@property (assign) IBOutlet NSButton *upButton;
@property (assign) IBOutlet NSButton *downButton;
@property (assign) IBOutlet NSButton *blankButton;

- (IBAction)tableViewSelected:(id)sender;
- (id)tableView:(NSTableView *)tableView objectValueForTableColumn:(NSTableColumn *)tableColumn row:(int)row;
- (int)numberOfRowsInTableView:(NSTableView *)tableView;

- (void)addButtonForImage:(NSImage *)filename;

- (void)windowDidResize:(NSNotification *)notification;

- (IBAction)imageClick:(id)sender;
- (IBAction)movieActionClick:(id)sender;
- (IBAction)arrangementClick:(id)sender;

- (void)redistributeImages;

+ (id)getSortedContentsOf:(NSString *)folder;
@end
